package cn.edu.ctbu.dp01.dao;

import cn.edu.ctbu.dp01.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface StudentRepository extends JpaRepository<Student, Integer> {

    /**
     * 按名字和密码查询
     * 按名子查询
     *
     * @param name
     * @return
     */


    List<Student> findByNameLike(String name);

    List<Student> findByNameAndPassword(String name, String password);


    Student save(Integer id);

}
